# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libhandy
pkgver=0.0.13
pkgrel=6
pkgdesc="Library full of GTK+ widgets for mobile phones"
url="https://source.puri.sm/Librem5/libhandy"
arch="all"
license="LGPL-2.0-or-later"
makedepends="meson glib-dev gtk+3.0-dev vala py3-setuptools gobject-introspection-dev"
checkdepends="xvfb-run ibus"
subpackages="$pkgname-dev"
source="https://source.puri.sm/Librem5/libhandy/-/archive/v$pkgver/libhandy-v$pkgver.tar.gz
	skip-test.patch
	"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	abuild-meson \
		-Dexamples=true \
		. output
	meson compile -C output
}

check() {
	xvfb-run meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

dev() {
	default_dev

	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr
}

sha512sums="
b9eaef775a93c200aa3f526b627827ed4530ff2a4c826ab24abdbd944075c0939232bd2c3388b8b8e34c6729cb11017a7af2bd3ff9eec78fbdc7e7dd9f11d24b  libhandy-v0.0.13.tar.gz
699b17da5aa1a0bff9bbaf962d84edcc80fba21130cf9f12cff004d84c6cd182a44c462acebf9ce4cddf26da61484f85985a94eb7812fe2d3639625182f41bb4  skip-test.patch
"
